package com.his.controller;

import com.his.bean.DzmHisInspectionfee;
import com.his.bean.DzmHisPrescriptionExtracharges;
import com.his.service.DzmHisPrescriptionExtrachargesService;
import com.his.service.DzmHisPrescriptionService;
import com.his.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RequestMapping("Pp")
@RestController
public class DzmHisPrescriptionController {

    @Autowired
    DzmHisPrescriptionExtrachargesService DzmHisPrescriptionExtrachargesService;

    @GetMapping("listInfo3")
    public ResponseResult  listInfo3(DzmHisPrescriptionExtracharges DzmHisPrescriptionExtracharges){
        return new ResponseResult(200,"查询成功",DzmHisPrescriptionExtrachargesService.listInfo3(DzmHisPrescriptionExtracharges));
    }

    @PostMapping("addInfo3")
    public  ResponseResult addInfo3(DzmHisPrescriptionExtracharges dzmHisPrescriptionExtracharges){

        return new ResponseResult(200,"添加成功",DzmHisPrescriptionExtrachargesService.addInfo3(dzmHisPrescriptionExtracharges));
    }

    @PostMapping("delInfo3")
    ResponseResult delInfo3(String preId) {
        return new ResponseResult(200, "删除成功", DzmHisPrescriptionExtrachargesService.delInfo3(preId));
    }

    @GetMapping("selectByIdInfo3/{preId}")
    ResponseResult selectByIdInfo3(@PathVariable  String preId) {
        return new ResponseResult(200, "单查成功", DzmHisPrescriptionExtrachargesService.selectByIdInfo3(preId));
    }

    @PostMapping("updateInfo3")
    ResponseResult updateInfo3(@RequestBody Map map) {
        System.err.println(map);
        return new ResponseResult(200, "修改成功", DzmHisPrescriptionExtrachargesService.updateInfo3(map));
    }






}
